package cn.iocoder.an.module.mold.controller.admin.equipmentkeepsetting.vo;

import cn.idev.excel.annotation.ExcelIgnoreUnannotated;
import cn.idev.excel.annotation.ExcelProperty;
import cn.iocoder.an.framework.excel.core.annotations.DictFormat;
import cn.iocoder.an.framework.excel.core.convert.DictConvert;
import cn.iocoder.an.module.mold.dal.dataobject.equipmentkeeptype.EquipmentKeepTypeDO;
import com.fhs.core.trans.anno.Trans;
import com.fhs.core.trans.constant.TransType;
import com.fhs.core.trans.vo.VO;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.time.LocalDateTime;

@Schema(description = "管理后台 - 维护项设置 Response VO")
@Data
@ExcelIgnoreUnannotated
public class EquipmentKeepSettingRespVO implements VO {

    @Schema(description = "id", requiredMode = Schema.RequiredMode.REQUIRED, example = "3346")
    @ExcelProperty("id")
    private Long id;

    @Schema(description = "维护项分类", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
    @Trans(type = TransType.SIMPLE, target = EquipmentKeepTypeDO.class, fields = "name", ref = "keepTypeName")
    private Long keepType;

    @ExcelProperty("维护项分类")
    private String keepTypeName;

    @Schema(description = "维护项名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "李四")
    @ExcelProperty("维护项名称")
    private String name;

    @Schema(description = "状态", example = "2")
    @ExcelProperty(value = "状态", converter = DictConvert.class)
    @DictFormat("maintenance_status") // TODO 代码优化：建议设置到对应的 DictTypeConstants 枚举类中
    private Integer status;

    @Schema(description = "维护方法", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelProperty("维护方法")
    private String keepMethod;

    @Schema(description = "维护标准", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelProperty("维护标准")
    private String keepNorm;

    @Schema(description = "描述", requiredMode = Schema.RequiredMode.REQUIRED, example = "你猜")
    @ExcelProperty("描述")
    private String description;

    @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelProperty("创建时间")
    private LocalDateTime createTime;

}